package test;

import org.destiny.msglipse.views.MessageView;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class MessageTestWindow{
	MessageView messageView;
	public MessageTestWindow() {
		Display display = new Display();
		Shell shell = new Shell(display);
		messageView = new MessageView();
		messageView.createPartControl(shell,false);
		shell.setBounds(50, 50, 300, 240);
		shell.open();
		shell.addDisposeListener(new DisposeListener() {
			@Override
			public void widgetDisposed(DisposeEvent e) {
				System.exit(0);
			}
		});
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}
		display.dispose();
	}

	public static void main(String[] args) {
		new MessageTestWindow();
	}
}